<core:WRAP file="pub/layout.html"  placeholder="Content">
<script>

function onClick(id,type,status,reason){
	document.forms[0].id.value=id;
	document.forms[0].type.value=type;
	document.forms[0].status.value=status;
	document.forms[0].reason.value=reason;
}
</SCRIPT>


<td class="mini" width="100%" valign="top" align="left" >
<table width="100%" border="0" style="padding-left:15;" cellpadding="0" cellspacing="0">
<tr>
<td>
	<core:include file="pub/myprofile/inc.topmenu.html">
</td></tr>

<tr><td><br><table width="100%" border="0" cellpadding="0" cellspacing="-1">
<tr><th class="lightblue" align="left">MY PROFILE</th>
<th class="lightblue" align="right" style="padding-right:5;">Welcome, {$firstname} {$lastname}</th></tr></table>
</td>
</tr>

<tr><td><core:include file="pub/myprofile/inc.menu.html"></td></tr>

<tr><td><br><table width="100%">
<td class="textlogin" width="20%"> <b>Your Status:</b></td>
<td class="textlogin">{$status}</td>
<td class="textlogin" style="font-size:10;"></td>
<td > <a href="register.htm" class="topcontmenu">Register</a></td>
</tr>
</table></td></tr>

<tr><td><table width="100%">
<td class="textlogin"  width="20%"> <b>Submit:</b></td>
<core:optional for="artwriter">
<td><a href="articles/submit.htm" class="topcontmenu">Article</a></td>
</core:optional>
<td><a href="players/submit.htm" class="topcontmenu">Player profile</a></td>
<td ><a href="teams/submit.htm" class="topcontmenu">Team profile</a></td>
<td ><a href="leagues/submit.htm" class="topcontmenu">Camp/league</a></td>
<td ><a href="calendar/submit.htm" class="topcontmenu">Calendar event</a></td>
</tr>
</table></td></tr>
<tr><td><hr size="4" class="login"></td></tr>

<tr><td>

<form method="post" name="myprofile_form" runat="server">
<table width="100%">
<input type="hidden" name="message" value="">
<input type="hidden" name="id" value="">
<input type="hidden" name="type" value="">
<input type="hidden" name="status" value="">
<input type="hidden" name="reason" value="">

<tr><td>
<list:LIST id='subscrlist'>
<table width="100%">
<tr><td><div class="lightblue">My subscriptions</div></td></tr>

<tr>
  <td>
	<table width="100%" cellpadding="0" cellspacing="-1">
		<tr>
			<th class="darkblue"  align="left">Type</th>
			<th class="darkblue">Start date</th>
			<th class="darkblue">Next Rebil</th>
			<th class="darkblue">Status</th>
			<th class="darkblue" >Reason</th>
			<th class="darkblue" align="left" >#payments</th>

		</tr>
		<list:ITEM>
		<tr>
			<td class="listitem" >{$type}</td>
			<td class="listitem"  align="center">{$start_date}</td>
			<td class="listitem"  align="center">
                <core:default for='reason'>
					{$next_rebill_date}
				</core:default>
			</td>
			<td class="listitem" >{$status}</td>
			<td class="listitem" >
				<core:optional for='reason'>{$reason}</core:optional>

				<core:default for='reason'>
				<core:optional for="active">
				<A HREF="{$paypal_url}?cmd=_subscr-find&alias={$business}&subscr_id={$paypal_subscription_id}" target="__blank">
					<IMG SRC="http://www.sandbox.paypal.com/en_US/i/btn/cancel_subscribe_gen.gif" BORDER="0">
				</A>
				</core:optional>
				</core:default>

			</td>
			<td class="listitem" >{$number_payments}&nbsp;
				<input type="submit" name="gethistory" value="Payments" onclick="onClick('{$id}','{$type}','{$status}','{$reason}');">
			</td>
		</tr>

		<list:separator>
		<tr>
			<td colspan="6"><hr size="2" class="login"></td>
		</tr>
		</list:separator>
		</list:ITEM>

	</table>
  </td>
</tr>
</table>
</list:LIST>

</td></tr>
<tr><td><hr size="4" class="login"></td></tr>
<tr><td><table>
<tr><td><img src="images/info_ico.jpg"></td>
<td>&nbsp;<img src="images/notasubscriber.gif"></td>
<td>&nbsp;<a href="subscribe.htm"><img border="0" src="images/subscribe.gif"></a></td>
</tr></table></td></tr>
<tr><td><hr size="4" class="login"></td></tr>
</table>
</form></td></tr>
<core:optional for='subscr_properties'>
<tr><td><div class="lightblue">Payment history for subscription - {$subscr_properties}</div></td></tr>
</core:optional>
<tr><td>
<list:LIST id='paylist'>
<table width="100%">
<tr><td><table width="100%" cellpadding="0" cellspacing="-1">
<tr><th class="darkblue" width="100"  align="left">Date</th>
<th class="darkblue"  width="100" align="left">Amount</th>
<th class="darkblue"  width="100" align="left">Status</th>
<th class="darkblue"  align="left">&nbsp;</th>
<list:ITEM>
<tr>
<td class="listitem" width="100"  >{$date}</td>
<td class="listitem"  width="100">${$payamount}</td>
<td class="listitem"  width="100">{$paystatus}</td>
</td>

</tr>
</list:ITEM>
</table>
<tr><td><hr size="4" class="login"></td></tr>
<tr><td class="textlogin" >Go to <a href="http://www.paypal.com" class="linklogin">PayPal</a> to view more about your transactions</td></tr>
</table></td></tr>
</table>
</list:LIST>
</td></tr>
</table>
</td>
